using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;
using System.Data;

namespace ERP.Reports
{
    public partial class rptTonkho : DevExpress.XtraReports.UI.XtraReport
    {
        public DataTable ds_BaoCao = null;
        public DataTable dsHoadon = null;
        public string ban = "";
        public string donvi = "";
        public string diachi = "";
        public string bangchu = "";

        public rptTonkho()
        {
            InitializeComponent();
        }
        public void In()
        {
            this.InBaoCao(this.ds_BaoCao);
            //this.tienHD(this.dsHoadon);
            this.lbNhanhoadon.Text = this.ban;
            this.lbDonvi.Text = this.donvi;
            this.lbDiachi.Text = this.diachi;
            //this.lbBangchu.Text = this.bangchu;
        }
        private void InBaoCao(DataTable dsReport)
        {

            this.DataSource = dsReport;

            this.txtSott.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
            new DevExpress.XtraReports.UI.XRBinding("Text", dsReport,"stt")});

            this.txtTenmon.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
            new DevExpress.XtraReports.UI.XRBinding("Text", dsReport,"tenhh")});

            this.txtDvt.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
            new DevExpress.XtraReports.UI.XRBinding("Text", dsReport,"donvitinh")});
            
            this.txtSoluong.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
            new DevExpress.XtraReports.UI.XRBinding("Text", dsReport,"soluong", "{0:#,#}")});

            this.txtThanhtien.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
            new DevExpress.XtraReports.UI.XRBinding("Text", dsReport,"tien","{0:#,#}")});


        }
    }
}
